{% if page.mermaid or site.mermaid %} 
    <script src="https://cdn.jsdelivr.net/npm/mermaid@9.1.6/dist/mermaid.min.js"></script>
    <script>
        $(document).ready(function (){
            mermaid.initialize({
                startOnLoad:true,
                theme: "default",
            });
            mermaid.init(undefined, $('.mermaid2'));
        });
    </script>
{% endif %}